package com.neuedu.hw_20190215;

public class LiteratureDepartment extends Student{
    //成员变量
    private Double lectureScore;
    private Double workScore;
    private Double finalExam;
    private Double middleExam;
    //行为方法

    public Double totalscore(){
        Double myTotalScore=lectureScore*0.35+workScore*0.35+finalExam+0.15+middleExam*0.15;
        return (double)Math.round(myTotalScore*100)/100;
    }


    //自定义构造方法

    public LiteratureDepartment(String stuID, String stuName, String strSex, int stuAge, Double lectureScore, Double workScore, Double finalExam, Double middleExam) {
        super(stuID, stuName, strSex, stuAge);
        this.lectureScore = lectureScore;
        this.workScore = workScore;
        this.finalExam = finalExam;
        this.middleExam = middleExam;
    }

    //显示默认构造方法

    public LiteratureDepartment() {
    }

    //为私有成员变量提供setter和getter方法

    public Double getLectureScore() {
        return lectureScore;
    }

    public void setLectureScore(Double lectureScore) {
        this.lectureScore = lectureScore;
    }

    public Double getWorkScore() {
        return workScore;
    }

    public void setWorkScore(Double workScore) {
        this.workScore = workScore;
    }

    public Double getFinalExam() {
        return finalExam;
    }

    public void setFinalExam(Double finalExam) {
        this.finalExam = finalExam;
    }

    public Double getMiddleExam() {
        return middleExam;
    }

    public void setMiddleExam(Double middleExam) {
        this.middleExam = middleExam;
    }
}
